//
//  ZCNetworkManager.h
//  zctx
//
//  Created by ZhengDarren on 15/9/28.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "DZNetworkBase.h"

#import "ZCMechanismModel.h"
#import "ZCMainModel.h"
#import "ZCItemModel.h"


#define NetworkManager [ZCNetworkManager sharedInstance]

@interface ZCNetworkManager : DZNetworkBase

+ (ZCNetworkManager *)sharedInstance;

-(NSString *)strURLBasic;

//1.1 请求接口头

#define URL_REQUEST_HEADER @"http://www.zhongcetianxia.com/index.php/Api"

- (void)requestUrlRequestHeaderssuccess:(void (^)(NSString *urlStr))blockSuccess failure:(void (^)(NSError *error))blockFailure;

// 2.1 验证码下发接口
#define URL_GET_VERIFY_CODE @"/Member/get_verify_code.html"
- (void)requestGetVerifyCodeWithAction:(NSString *)strAction
                                mobile:(NSString *)strMobile
                               success:(void (^)(NSDictionary *dictResponse))blockSuccess
                               failure:(void (^)(NSError *error))blockFailure;


// 2.2验证码验证接口

#define URL_VERIFY_CODE @"/Member/verify_code.html"
- (void)requestVerifyCodeWithCode:(NSString *)strCode
                                mobile:(NSString *)strMobile
                          device_token:(NSString *)strdevice_token
                               success:(void (^)(NSDictionary *dictResponse))blockSuccess
                               failure:(void (^)(NSError *error))blockFailure;

//2.3 用户刷新个人资料接口

#define URL_GET_MEMBER_INFO @"/Member/get_member_info.html"
- (void)requestGetMemberInfoWithMid:(NSString *)strMid
                         password:(NSString *)strPassword
                     device_token:(NSString *)strdevice_token
                          success:(void (^)(NSDictionary *dictResponse))blockSuccess
                          failure:(void (^)(NSError *error))blockFailure;


//2.3.1 微信登陆接口
#define URL_GET_MEMBER_INFO_BY_UNIONID @"/Member/get_member_info_by_unionid.html"
- (void)requestGetMemberInfobyunionidWithUnionid:(NSString *)strUnionid
                                 openid:(NSString *)strOpenid
                              from_type:(NSString *)strfromType
                             device_token:(NSString *)strdevice_token
                                  success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                  failure:(void (^)(NSError *error))blockFailure;



//2.4 获取分享到微信朋友圈的信息
#define URL_GET_MY_SHARE @"/Member/get_my_share.html"
- (void)requestGetMyshareWithMid:(NSString *)strmid
                                        password:(NSString *)strpassword
                                               success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                               failure:(void (^)(NSError *error))blockFailure;

//2.5 获取我的通知

#define URL_GET_MY_NOTICE @"/Member/get_my_notice.html"
- (void)requestGetMyNoticeWithMid:(NSString *)strmid
                        password:(NSString *)strpassword
                         success:(void (^)(NSArray *ArrayResponse))blockSuccess
                         failure:(void (^)(NSError *error))blockFailure;

//3.1 获取检测项目列表

#define URL_FOUNDING_GET_PACKAGES @"/Founding/get_packages.html"
- (void)requestFoundingGetPackagessuccess:(void (^)(NSArray *array))blockSuccess failure:(void (^)(NSError *error))blockFailure;

// 3.1.1 获取检测套餐详情
#define URL_FOUNDING_GET_PACKAGES_INFORMATION @"/Founding/get_packages_information.html"
- (void)requestFoundingGetPackageWithId:(NSString *)strId
                                success:(void (^)(ZCItemModel *model))blockSuccess
                                failure:(void (^)(NSError *error))blockFailure;


//3.2 获取第三方检测机构列表

#define URL_FOUNDING_GET_LABS @"/Founding/get_labs.html"
- (void)requestFoundingGetLabssuccess:(void (^)(NSArray *array))blockSuccess
                              failure:(void (^)(NSError *error))blockFailure;



//3.3 发布众筹提交后台审核

#define URL_FOUNDING_PUBLISH @"/Founding/publish.html"
- (void)requestFoundingPublishWithMid:(NSString *)strmid
                             password:(NSString *)strpassword
                               pjname:(NSString *)strpjname
                               pdname:(NSString *)strpdname
                             citycode:(NSString *)strcitycode
                                brand:(NSString *)strbrand
                            packageid:(NSString *)strpackageid
                        institutionid:(NSString *)instiutionid
                               emoney:(NSString *)stremoney
                             fromtype:(NSString *)strfromtype
                              content:(NSString *)strcontent
                              success:(void (^)(NSDictionary *dictResponse))blockSuccess
                              failure:(void (^)(NSError *error))blockFailure;

//3.4 获取众筹列表(包括搜索功能)

#define URL_FOUNDING_GET_ALL @"/Founding/get_all.html"
- (void)requestFoundingGetAllWithType:(NSString *)strtype
                             mid:(NSString *)strpassword
                               password:(NSString *)strpjname
                               mtype:(NSString *)strpdname
                                pagecount:(NSString *)strbrand
                            keywords:(NSString *)strpackageid
                              success:(void (^)(NSArray *array))blockSuccess
                              failure:(void (^)(NSError *error))blockFailure;


//3.4.1 获取众筹列表(首页最新)

#define URL_FOUNDING_GET_LATEST @"/Founding/get_latest.html"
- (void)requestFoundingGetLatestWithMid:(NSString *)strmid
                                  password:(NSString *)strpassword
                              success:(void (^)(NSDictionary *dictResponse))blockSuccess
                              failure:(void (^)(NSError *error))blockFailure;


//3.5 获取单个众筹项目详情
#define URL_FOUNDING_GET_One @"/Founding/get_one.html"
- (void)requestFoundingGetOneWithId:(NSString *) strid
                               Mid:(NSString *)strmid
                               password:(NSString *)strpassword
                                success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                failure:(void (^)(NSError *error))blockFailure;


//3.5.1 获取单个众筹项目赞助列表
#define URL_FOUNDING_GET_One_SPONSOR @"/Founding/get_one_sponsor.html"
- (void)requestFoundingGetOneSponsorWithId:(NSString *) strid
                                Mid:(NSString *)strmid
                                  password:(NSString *)strpassword
                                 pagecount:(NSString *)strpagecount
                            success:(void (^)(NSDictionary *dictResponse))blockSuccess
                            failure:(void (^)(NSError *error))blockFailure;

//// 3.6 发起众筹接口
//#define URL_FOUNDING_PUBLISH @"/Founding/publish.html"
//- (void)requestFoundingPublishWithMid:(NSInteger)strmid
//                             password:(NSString *)strpassword
//                               pjname:(NSString *)strpjname
//                               pdname:(NSString *)strpdname
//                             citycode:(NSString *)strcitycode
//                                brand:(NSString *)strbrand
//                            packageid:(NSString *)strpackageid
//                        institutionid:(NSString *)instiutionid
//                               emoney:(NSString *)stremoney
//                              success:(void (^)(NSDictionary *dictResponse))blockSuccess
//                              failure:(void (^)(NSError *error))blockFailure;


// 3.7 众筹支付(微信、支付宝、银联)[包括发起人的支付和赞助人的支付]
#define URL_FOUNDING_PAYIT @"/Founding/payit.html"
- (void)requestFoundingPayitWithMid:(NSString *)strmid
                           password:(NSString *)strpassword
                               type:(NSString *)strtype
                               fdid:(NSString *)strfdid
                             donate:(NSString *)strdonate
                                   success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                   failure:(void (^)(NSError *error))blockFailure;

//3.8 获取项目分享到微信朋友圈的信息
#define URL_FOUNDING_GET_SHARE @"/Founding/get_share.html"
- (void)requestFoundingGetShareWithMid:(NSString *)strmid
                              password:(NSString *)strpassword
                                  fdid:(NSString *)strfdid
                            success:(void (^)(NSDictionary *dictResponse))blockSuccess
                            failure:(void (^)(NSError *error))blockFailure;

//4.1 通过条形码获取产品资料
#define URL_PRODUCT_GET_INFO_BY_BARCODE @"/Product/get_info_by_barcode.html"
- (void)requestProductGetInfoByBarcodeWithMid:(NSString *)strmid
                                      barcode:(NSString *)strbarcode
                               success:(void (^)(NSDictionary *dictResponse))blockSuccess
                               failure:(void (^)(NSError *error))blockFailure;


//4.2 通过产品id获取产品信息
#define URL_PRODUCT_GET_INFO_BY_PID @"/Product/get_info_by_pid.html"
- (void)requestProductGetInfoByPidWithMid:(NSInteger)strmid
                                      pid:(NSInteger)strpid
                                      success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                      failure:(void (^)(NSError *error))blockFailure;

//4.3 产品关键字搜索列表

#define URL_PRODUCT_GET_INFO_BY_KEYWORDS @"/Product/get_info_by_keywords.html"
- (void)requestProductGetInfoByKeywordsWithMid:(NSString *)strmid
                                      keywords:(NSString *)strkeywords
                                   keywords_py:(NSString *)strkeywords_py
                                  success:(void (^)(NSDictionary *dictResponse))blockSuccess
                                  failure:(void (^)(NSError *error))blockFailure;


//5.1 广告列表

#define URL_INDEX_AD_LISTS @"/Index/ad_lists.html"
- (void)requestIndexadlistsWithsuccess:(void (^)(NSDictionary *dictResponse))blockSuccess failure:(void (^)(NSError *error))blockFailure;

@end
